<?php
    include "./config.php";
    include "./lang/" . $lang;
    include "./squidcommon.php";

    $username = $_POST["username"];
    $password = $_POST["password"];
    $comments = $_POST["comments"];

    $username = preg_replace("/[\&{0,}]|[\'{0,}]|[\"{0,}]|[\\{0,}]|[\/{0,}]|[\%{0,}]|[\({0,}]|[\){0,}]|[\*{0,}]|[\>{0,}]|[\<{0,}]/", "", $username);
    $password = preg_replace("/[\&{0,}]|[\'{0,}]|[\"{0,}]|[\\{0,}]|[\/{0,}]|[\%{0,}]|[\({0,}]|[\){0,}]|[\*{0,}]|[\>{0,}]|[\<{0,}]/", "", $password);
    $comments = preg_replace("/[\&{0,}]|[\'{0,}]|[\"{0,}]|[\\{0,}]|[\/{0,}]|[\%{0,}]|[\({0,}]|[\){0,}]|[\*{0,}]|[\>{0,}]|[\<{0,}]/", "", $comments);

    write_user_data($username, $password, $comments, $squid_database);
?>
